public class add6_14 {
    public static double computePi(int i) {
        double pi = 0;
        int k;
        for (k = 1; k <= i; k++) {
            int sign;
            if (k % 2 == 1) {
                sign = 1;
            } else {
                sign = -1;
            }
            pi = pi + sign * 1.0 / (2 * k - 1);
        }
        pi = pi * 4;
        return pi;
    }

    public static void main(String[] args) {
        System.out.println("i\t\tm(i)");
        System.out.println("---------------------");
        int i;
        for (i = 1; i <= 901; i = i + 100) {
            double pi = computePi(i);
            System.out.printf("%d\t\t%.4f\n", i, pi);
        }
    }
}